﻿using MediatR;
using RBAC.LuFang.API.Application.Command.heathCommand;
using RBAC.LuFang.Domin.Services.TraceabilityService;

namespace RBAC.LuFang.API.Application.CommandHandlers.heathCommandhandler
{
    //删除保健信息
    public class heathDeleteCommandHandler:IRequestHandler<heathDeleteCommand,int>
    {
        private readonly IGoodsService _goodsService;

        public heathDeleteCommandHandler(IGoodsService goodsService)
        {
            _goodsService = goodsService;
        }

        public async Task<int> Handle(heathDeleteCommand request, CancellationToken cancellationToken)
        {
            return await _goodsService.Delhealth(request.healthid);
        }
    }
}
